package com.vchello.controller;

import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.vchello.bean.user.User;

@Controller
@RequestMapping(value = "/test")
public class TestController extends BaseController {

	@RequestMapping(value = "/list", method = RequestMethod.POST)
	public void list(@RequestParam(value = "arrays[]") String[] arrays){
		System.out.println(arrays);
	}
	
	@RequestMapping(value = "/list1", method = RequestMethod.POST)
	public void list1(@RequestBody List<User> users){
		System.out.println(users);
	}
	@RequestMapping(value = "/list2", method = RequestMethod.POST)
	public void list2(User user){
		System.out.println(user.toString());
	}
	@RequestMapping(value = "/list3", method = RequestMethod.POST)
	public void list3(@RequestParam(value = "arrays[]") String[] arrays){
		System.out.println(arrays.toString());
	}
}
